package com.ws.shop.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.ws.shop.bean.Page;
import com.ws.shop.dao.AuctionLogDao;
import com.ws.shop.entity.AuctionLog;
import com.ws.shop.service.AuctionLogService;



@Service(value="auctionlogService")
public class AuctionLogServiceImpl implements AuctionLogService {
	@Resource(name="auctionlogDao")
	private AuctionLogDao auctionlogDao;
	
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Page findAuctionLogByPage(int pageno, int pagesize, String start,
			String end, String name, int aid) {
		return auctionlogDao.findAuctionLogByPage(pageno,pagesize,start,end,name,aid);
	}

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Map mycount(long aid, long uid) {
		return auctionlogDao.mycount(aid, uid);
	}
	
	public void getAuctionLogByUid(final Page page,final long uid){
		auctionlogDao.getAuctionLogByUid(page, uid);
	}

	public void getAuctionLogByUidAndAid(Page page, long uid, long aid) {
		auctionlogDao.getAuctionLogByUidAndAid(page, uid, aid);
		
	}

	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public Page findAuctionLog(int pageno, int pagesize, long aid) {
		return auctionlogDao.findAuctionLogByPage(pageno, pagesize, aid);
	}

	
	public List<AuctionLog> getLogData(final long aid){
		return auctionlogDao.getLogData(aid);
	}


	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public List<Map<String,Object>> findAuctionLogList(int startrow, int size, long aid) {
		return auctionlogDao.findAuctionLogList(startrow, size, aid);
	}

}
